<html><head><title>Normal Math-Formulas</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="5">Normal Math-Formulas</font></b></p>

<p><b>Introduction</b></p><blockquote>


Following you find a nomination of various mathematical formulas. They should be a reference and 
also be helpful, to close possibly knowledge gaps. Because without good math knowledge complex 
games and applications can't be realized. <br>
<br>
Note: Instead of the used sign '^' please use the PureBasic function Pow() from the 'Math' library. 
'PI' stands for the constant value &quot;PI = 3.1415...&quot;. An example for realizing such a formula in PureBasic 
code: A = PI*r^2 will be A = PI*Pow(r,2) 

</blockquote>
<p><b>Square</b></p><blockquote>


<p><img src="images/formula01.gif"></p>

l = Side length <br>
e = Corner measure (ment) <br>
A = Surface <br>
U = Extent <br>
<br>
<b>Surface:</b> A = l^2 <br>
<br>
<b>Extent:</b> U = 4*l <br>
<br>
<b>Corner measure (ment):</b> e = SQR(2)*l 


</blockquote>
<p><b>Rhombus/Lozenge</b></p><blockquote>


<p><img src="images/formula02.gif"></p>

l = Side length <br>
b = Width <br>
A = Surface <br>
U = Extent <br>
<br>
<b>Surface:</b> A = l*b <br>
<br>
<b>Extent:</b> U = 4*l <br>


</blockquote>
<p><b>Rectangle</b></p><blockquote>


<p><img src="images/formula03.gif"></p>

l = Length <br>
b = Width <br>
e = Corner measure (ment) <br>
A = Surface <br>
U = Extent <br>
<br>
<b>Surface:</b> A = l*b <br>
<br>
<b>Extent:</b> U = 2*l+2*b <br>
<br>
<b>Corner measure (ment):</b> e = SQR(l^2+b^2)) <br>


</blockquote>
<p><b>Rhomboid/Parallelogramm</b></p><blockquote>


<p><img src="images/formula04.gif"></p>

l = Lengthens <br>
h = Height <br>
b = Width <br>
A = Surface <br>
U = Extent <br>
<br>
<b>Surface:</b> A = l*h <br>
<br>
<b>Extent:</b> U = 2*l+2*b <br>


</blockquote>
<p><b>Trapezoid</b></p><blockquote>


<p><img src="images/formula05.gif"></p>

a = Side 1 <br>
b = Side 2 <br>
c = Side 3 <br>
d = Side 4 <br>
lm = Middle length <br>
h = Height <br>
A = Surface <br>
U = Extent <br>
<br>
<b>Surface:</b> A = (a+c)/2*h <br>
<br>
<b>Extent:</b> U = a+b+c+d <br>
<br>
<b>Middle Length:</b> lm = (a+c)/2  <br>


</blockquote>
<p><b>Triangle</b></p><blockquote>


<p><img src="http://www.purebasic.com/documentation/reference/images/formula06.gif"></p>

a = Side 1 <br>
b = Side 2 <br>
c = Side 3 <br>
l = Side length <br>
h = Height <br>
A = Surface <br>
U = Extent <br>
<br>
<b>Surface:</b> <br>
A = (l*h)/2 <br>
A = 1/4*SQR(U*(U-2*a)*(U-2*b)*(U-2*c)) <br>
<br>
<b>Extent:</b> U = a+b+c <br>


</blockquote>
<p><b>Polygon</b></p><blockquote>


<p><img src="images/formula07.gif"></p>

l = Side length <br>
d = Interior circle diameter <br>
D = Periphery diameter <br>
n = Number of corners <br>
a = Central angle <br>
ss = Corner angle <br>
A = Surface <br>
U = Extent <br>
<br>
<b>Interior circle diameter:</b> d = SQR(D*D-l*l) <br>
<br>
<b>Periphery diameter:</b> D = SQR(d*d+l*l) <br>
<br>
<b>Side length:</b> l = D*SIN(180/n) <br>
<br>
<b>Central angle:</b> a = 360/n <br>
<br>
<b>Corner angle:</b> ss = 180-a <br>
<br>
<b>Surface:</b> A = n*l*d/4 <br>
<br>
<b>Extent:</b> U = l*n <br>


</blockquote>
<p><b>Circle</b></p><blockquote>


<p><img src="images/formula08.gif"></p>

r = Radius <br>
D = Diameter <br>
A = Surface <br>
U = Extent <br>
<br>
<b>Surface:</b> <br>
A = PI*r^2 <br>
A = PI/4*d^2 <br>
<br>
<b>Extent:</b> <br>
U = 2*PI*r <br>
U = PI*d <br>


</blockquote>
<p><b>Sector of a circle</b></p><blockquote>


<p><img src="images/formula09.gif"></p>

r = Radius <br>
D = Diameter <br>
l = Sinew length <br>
lb = Length of curve <br>
a = Central angle <br>
A = Surface <br>
U = Extent <br>
<br>
<b>Sinew length:</b> l = 2*r*SIN(a/2) <br>
<br>
<b>Length of curve:</b> lb = PI*r*a/180 <br>
<br>
<b>Surface:</b> <br>
A = PI*D^2*a/1440 <br>
A = lb*r/2 <br>
<br>
<b>Extent:</b> U = lb+D 


</blockquote>
<p><b>Circle section</b></p><blockquote>


<p><img src="images/formula10.gif"></p>

r = Radius <br>
D = Diameter <br>
l = Sinew length <br>
lb = Length of curve <br>
a = Central angle <br>
b = Width <br>
A = Surface <br>
U = Extent <br>
<br>
<b>Sinew Length:</b> <br>
l = 2*r*SIN(a/2) <br>
l = 2*SQR(b*(2*r-b)) <br>
<br>
<b>Length of curve:</b> lb = PI*r*a/180 <br>
<br>
<b>Width:</b> <br>
b = l/2*TAN(a/4) <br>
b = r-SQR(r^2-l^2/4) <br>
<br>
<b>Radius:</b> r = b/2+l^2/(8*b) <br>
<br>
<b>Surface:</b> <br>
A = PI*d^2*a/1440-(l*(r-b))/2 <br>
A = (lb*r-l*(r-b))/2 <br>
<br>
<b>Extent:</b> U = lb+l <br>


</blockquote>
<p><b>Annulus</b></p><blockquote>


<p><img src="images/formula11.gif"></p>

d = Inside diameter <br>
D = Outside diameter <br>
dm = Middle diameter <br>
b = Width <br>
A = Surface <br>
<br>
<b>Middle diameter:</b> dm = (D+d)/2 <br>
<br>
<b>Surface:</b> <br>
A = PI*dm*b <br>
A = PI/4*(D^2-d^2) <br>


</blockquote>
<p><b>Memory consumption of a picture</b></p><blockquote>


a = Width of picture (in Pixel) <br>
b = Height of picture (in Pixel) <br>
bits = Colordepth of the picture (in Bits) <br>
<br>
size = a * b * (bits / 8) <br>


</blockquote>
<p><b>Distance between two points</b></p><blockquote>


(x1|y1) = XY coordinates of point No. 1 <br>
(x2|y2) = XY coordinates of point No. 2 <br>
a = Distance between the points <br>
<br>
a = SQR((x1-x2)^2 + (y1-y2)^2) 


</blockquote>
<p><b>"Mixing" of two values</b></p><blockquote>


a = 1st Number <br>
b = 2nd Number <br>
v = Relationship (0% - 100%) <br>
e = Result <br>
<br>
e = ((a*v)/100) + ((b*(100-v)) / 100) <br>

</body></html>